package com.chen.servicedriveruser.controller;

import com.chen.internalcommon.dto.ResponseResult;
import com.chen.servicedriveruser.service.CityDriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenLiuPing
 **/
@RestController
@RequestMapping("city-driver")
public class CityDriverController {
    @Autowired
    private CityDriverUserService cityDriverUserService;

    /**
     * 查看指定城市是否有可用司机
     * @param cityCode 指定城市行政区代码
     * @return
     */
    @GetMapping("is-alailable-driver")
    public ResponseResult isAvailableDriver(String cityCode) {
        return cityDriverUserService.isAvailableDriver(cityCode);
    }


}
